#!/bin/bash

function update_aptsource()
{
	cd /etc/apt ; sudo cp -v sources.list sources.list.bak
	sudo cp -v `pwd`/sources.list /etc/apt
	sudo apt-get update
}

function install_vimtools()
{
	sudo apt-get install -y git
	mkdir -p ${HOME}/workdir/github 2>/dev/null
	cd ${HOME}/workdir/github ; \
		git clone -b vimtools-ubuntu-SI \
		https://gitee.com/SeaflyGitee/vimtools \
		vimtools-ubuntu-SI && cd vimtools-ubuntu-SI/ ; \
		bash build_all.sh --all
	return 0
}


update_aptsource
sudo apt-get install -y git
sudo apt-get install -y net-tools
sudo apt-get install -y gcc
sudo apt-get install -y g++
sudo apt-get install -y xpad
sudo apt-get install -y tree
sudo apt-get install -y libelf-dev libelf-devel
sudo apt-get install -y elfutils-libelf-devel
sudo apt-get install -y libssl-dev
sudo apt-get install -y linux-libc-dev:amd64
sudo apt-get install -y bison
sudo apt-get install -y libncurses5-dev libncursesw5-dev
sudo apt-get install -y libelf-dev
install_vimtools
apt-cache search linux-source
sudo apt-get install -y linux-source-4.15.0
sudo apt-get install -y qemu
git_clone "https://github.com/ryancdotorg/brainflayer"
git_clone "https://github.com/bitcoin/bitcoin"

